#答案选项

import random

file_axx = open("unit_1_axx_part08.txt", 'w', encoding="utf-8")
file_bxx = open("unit_1_bxx_part08.txt", 'w', encoding="utf-8")
file_cxx = open("unit_1_cxx_part08.txt", 'w', encoding="utf-8")
file_dxx = open("unit_1_dxx_part08.txt", 'w', encoding="utf-8")

list_part_1 = ["disagree", "disagreed", "disagree on", "disagree with", "item"]
list_part_2 = ["grateful", "gratefully", "gratefulness"]
list_part_3 = ["dislike", "hate", "item by item"]
list_part_4 = ["join in", "take part in", "join"]
list_part_5 = ["tip", "tipper", "tipped"]
list_part_6 = ["second", "secondly"]
list_part_7 = ["swap", "swapped", "swap in", "swap out"]

list_answer = [list_part_1,list_part_2,list_part_3,list_part_4,list_part_5,list_part_6,list_part_7]

for i in range(400):
    
    test01 = random.randint(0, 6)
    test02 = random.randint(0, 6)
    test03 = random.randint(0, 6)
    test04 = random.randint(0, 6)

    if test01 != test02 != test03 != test04:
        
        i_1 = random.randint(0, len(list_answer[test01])-1)
        i_2 = random.randint(0, len(list_answer[test02])-1)
        i_3 = random.randint(0, len(list_answer[test03])-1)
        i_4 = random.randint(0, len(list_answer[test04])-1)
        
        file_axx.write("\""+list_answer[test01][i_1]+"\",")
        file_bxx.write("\""+list_answer[test02][i_2]+"\",")
        file_cxx.write("\""+list_answer[test03][i_3]+"\",")
        file_dxx.write("\""+list_answer[test04][i_4]+"\",")
        
file_axx.close()
file_bxx.close()
file_cxx.close()
file_dxx.close()

